home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c / 193 < prev    next >
Text File  |  1996-08-06  |  3KB  |  55 lines

  1. Path: gabi-soft.fr!usenet
  2. From: kanze@gabi.gabi-soft.fr (J. Kanze)
  3. Newsgroups: comp.lang.c,comp.std.c
  4. Subject: Re: Integral conversion e.t.c. (was: Re: Hungarian notation)
  5. Date: 26 Jan 1996 15:48:33 GMT
  6. Organization: GABI Software, Sarl.
  7. Message-ID: <KANZE.96Jan26164833@gabi.gabi-soft.fr>
  8. References: <30C40F77.53B5@swsbbs.com> <SPENCER.96Jan22113215@zorgon.ERA.COM>
  9.     <4e1nd8$hv0@solutions.solon.com> <3104bfc8.132251392@nntp.ix.netcom.com>
  10.     <4e2ppd$lsu@solutions.solon.com> <DLnG5H.748@mv.mv.com>
  11.     <DLoy4x.AFG@mv.mv.com>
  12. NNTP-Posting-Host: gabi.gabi-soft.fr
  13. In-reply-to: ENGR@GSSI.MV.COM's message of Wed, 24 Jan 1996 15:10:08 GMT
  14.  
  15. In article <DLoy4x.AFG@mv.mv.com> ENGR@GSSI.MV.COM (Michael Furman)
  16. writes:
  17.  
  18. >   Could somebody please clarify is "C" standard so strict and does not let
  19. > use some constructions that "C++" draft stadard let? Namely:
  20.  
  21. > 1. Integer conversion when source value can not be represented in destination
  22. > type. In C++ it is defined. In case of both unsigned types it completely
  23. > defined in standard; othervise details of "how it will be converted" must
  24. > be defined by implementation. 
  25.  
  26. I don't see any difference in meaning in the two standards:
  27.  
  28. C (ISO 9899, section 6.2.1.2): "When a value with integral type is
  29. demoted to a signed integer with smaller size, or an unsigned integer is
  30. converted to its corresponding signed integer, if the value cannot be
  31. represented the result is implementation defined."
  32.  
  33. C++ (Sept. 1995 draft, section 4.7): "If the destination type is signed,
  34. the value is unchanged if it can be represented in the destination type
  35. (and bitfield width); otherwise the value is implementation defined."
  36.  
  37. Could you clarify where you see the difference?
  38.  
  39. > 2. Implementation extention: additional forms of function main, like:
  40. > int main(int argc, char * * argv, char * env);
  41. > In C++ draft standard said that any implementation must allow 2 kinds if
  42. > "main" definitions, but does not forbid extentions.
  43.  
  44. Existing practice?  Reality?  The rule that forbids extensions in the C
  45. standard is completely ignored, as far as I can tell.  All of the Unix
  46. compilers I'm familiar with, for example, allow the version you cite (or
  47. rather a version with a char** as third parameter).
  48. -- 
  49. James Kanze           (+33) 88 14 49 00          email: kanze@gabi-soft.fr
  50. GABI Software, Sarl., 8 rue des Francs Bourgeois, 67000 Strasbourg, France
  51. Conseils, Θtudes et rΘalisations en logiciel orientΘ objet --
  52.               -- A la recherche d'une activitΘ dans une region francophone
  53.